<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">

    <link rel="stylesheet" href="//at.alicdn.com/t/font_tnyc012u2rlwstt9.css" media="all"/>
    <link rel="stylesheet" href="{:_SKIN}/shadmin/v3//css/news.css" media="all"/>
</head>
<body class="childrenBody">
<blockquote class="layui-elem-quote mylog-info-tit">
    <div class="layui-inline">
        <form class="layui-form" id="roleSearchForm">
            <div class="layui-input-inline" style="width:110px;">
                <select name="searchTerm" id="state">

                    {notempty name="state"}


                    {switch name="state"}
                    {case value="1"}
                    <option value="{$state}">未审核</option>
                    {/case}

                        {case value="2"}
                    <option value="{$state}">未通过</option>
                        {/case}


                        {case value="3"}
                    <option value="{$state}">已上架</option>
                        {/case}


                        {case value="4"}
                    <option value="{$state}">已下架</option>
                        {/case}


                        {/switch}







                    {/notempty}
                    <option value="0">全部</option>
                </select>

            </div>
            <div class="layui-input-inline" style="width:180px;">
                <input type="text" name="searchContent" id="key" value="" placeholder="请输入商家名称" class="layui-input search_input">
            </div>
            <a class="layui-btn layui-btn-normal  roleAdd_btn" id="so"> <i class="layui-icon larry-icon larry-xinzeng1"></i>查询提现</a>
        </form>
    </div>
</blockquote>

<div class="layui-form news_list">
    <table class="layui-table">
        <colgroup>
            <col width="100">
            <col>
            <col width="9%">
            <col width="8%">
            <col width="9%">
            <col width="9%">
            <col width="10%">
            <col width="10%">
            <col width="15%">

        </colgroup>
        <thead>
        <tr>
            <th>id</th>
            <th style="text-align:left;">申请提现人店铺</th>
            <th>申请提现人名称</th>
            <th>申请提现金额</th>
            <th>剩余提现余额</th>
            <th>申请人开户行</th>
            <th>申请人开户行名称</th>
            <th>申请提现时间</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody class="news_content">
        {volist name="info" id="v"}
        <tr>
            <td>{$v.id}
            </td>
            <td> {$v.bname}</td>
            <td>{$v.uname}</td>
            <td>￥{$v.money}元</td>
            <td>￥{$v.balance}元</td>
            <td>{$v.kh}</td>
            <td>{$v.khh}</td>
            <td>{$v['create_time']}</td>
            <td>
                {if condition="$v.state eq 4"} <a id="tin-{$v.id}" onclick='ting(this,"{$v.id}")' class="layui-btn layui-btn-danger layui-btn-mini news_collect" id="getorder" style="background-color:{$v.state == 4 ?'green':'green'}">{$v.state == 4?"待处理":"已完成"}</a>{else condition="$v.state eq 5"}<a id="tin-{$v.id}" onclick='ting(this,"{$v.id}")' class="layui-btn layui-btn-danger layui-btn-mini news_collect" id="getorder" style="background-color:{$v.state == 5 ?'red':'green'}">{$v.state == 5 ?"已处理":"待处理"}</a>{/if}
                
            </td>
        </tr>
        {/volist}
        </tbody>
    </table>
</div>

<div id="page">{$page}</div>
{:jq()}
{:layui()}
<style>
    .pagination {
        margin-left: 50px;
    }

    .pagination li {
        float: left;
        background: #34a8fe;
        color: #fff;
        margin-right: 8px;
    }

    .pagination li a, .pagination li span {
        color: #fff;
        padding: 8px 10px;
        display: block
    }

    .pagination .active {
        background-color: #fe6738
    }

</style>
<script type="text/javascript">
     function ting(obj,id) {
            Up(id);

        }

        function Up(id) {
             if (confirm('确认已打货款到商家账户?')) {
            id = parseInt(id);
            $.post('{:url('user/Seller/checkthelist')}', {id: id}, function(data) {
                if (data.status) {
                    var status = $('#vip-'+id).children('td').eq(11).text();
                    if(status=="发货"){
                        $('#tin-'+id).children('td').eq(11).html('已发货');
                    }else{
                        $('#tin-'+id).children('td').eq(11).html('停用');
                        $('#tin-'+id).html('已处理').css('background-color','red');
                    }
                }
            });
            }
        }
</script>
</body>
</html>